# -*- coding: utf-8 -*-
from datetime import timedelta
from utils.operators.spark_submit import SparkSubmitOperator
from jms.dm.route.dm_route_selected import dm__dm_route_whole_selected
from jms.time_sensor.time_after_08_00 import time_after_08_00

hbase__dm_route_recommend_2hbase = SparkSubmitOperator(
    task_id='hbase__dm_route_recommend_2hbase',
    pool_slots=8,
    email=['shenjiaming@jtexpress.com','yl_bigdata@yl-scm.com'],
    name='hbase__dm_route_recommend_2hbase',
    driver_memory='8G',
    executor_memory='8G',
    executor_cores=4,
    num_executors=50,
    java_class='com.yunlu.bigdata.jobs.export.Hive2HBaseRouteRecommend',
    application='hdfs:///scheduler/jms/spark/lch/route_recommend/jobs-1.0-SNAPSHOT.jar',
    application_args=['{{ execution_date | cst_ds }}'],
    execution_timeout=timedelta(hours=2),
)

hbase__dm_route_recommend_2hbase << [dm__dm_route_whole_selected, time_after_08_00]
